<?php /* Smarty version 2.6.18, created on 2008-06-12 23:41:55
         compiled from admin/Websetup_menu.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'get_app_inf', 'admin/Websetup_menu.html', 4, false),array('function', 'webcontrol', 'admin/Websetup_menu.html', 133, false),)), $this); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">  
<head>  
<title><?php echo $this->_plugins['function']['get_app_inf'][0][0]->_pi_func_get_app_inf(array('key' => 'siteName'), $this);?>
 - <?php echo $this->_tpl_vars['title']; ?>
</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />  
<!-- add your meta tags here -->  
  
<link href="css/my_layout.css" rel="stylesheet" type="text/css" />
<link href="css/screen/menu.css" rel="stylesheet" type="text/css" />  
<!--[if lte IE 7]>  
<link href="css/my_patches/patch_my_layout.css" rel="stylesheet" type="text/css" />  
<![endif]-->  
<script type="text/javascript" src="script/jquery.js"><!-- jQuery 1.2.1 --></script>
<script type="text/javascript" src="script/jquery.form.js"><!-- 表单Ajax插件 --></script>
<script type="text/javascript" src="script/yav.js"><!-- 表单验证插件 --></script>
<script type="text/javascript" src="script/jquery.yav.pack.js"><!-- 表单验证插件 --></script>
<script type="text/javascript" src="script/jquery.confirm.js"><!-- 对话框插件 --></script>

<script type="text/javascript">
<!--

// 在网页载入时加载
$(function() {
	
	// 保存到数据库按钮变色
	$("input:button, input:submit").hover(function(){
		$(this).addClass("OMover");
	},function(){
		$(this).removeClass("OMover");
	});
	
	// 当下拉菜单项被点击
	$("#select_perGroup_add").change(function(){
		if($(this).val==""){return false;}
		$.get("websetup.php",{
			controller : 'admin_menu',
			action     : 'getperbygroup',
			group_id   : $(this).val()
		},function(response){
			// 先清除原有项目，在生成select_permission_add下拉列表项
			$("#select_permission_add").html("");
			$("#select_permission_add").append("<option>请选择</option>");
			list = eval('(' + response + ')');
			$.each(list,function(i,value){
				$("#select_permission_add").append("<option value=\"" + value.pername + "\">" + value.aliasname + "(" + value.pername + ")</option>");
			});
			// 选中第一个项目
			$("#select_permission_add option:first").attr("selected","selected");
		});
	});

	// 删除按钮被点击时的事件
	$("#button_menu_remove").click(function(){
		$.get("websetup.php", {
			controller : 'admin_menu',
			action	   : 'menuremove',
			menu_id    : $("#menu_id_remove").val()
		 },function(data){
		 	if(data){
		 		location.reload();
		 	}else{
		 		alert('发生错误，未能删除！');
		 	}
		 }
		);
	});

	// 删除菜单项时显示confirm对话框
	$('#button_menu_remove').confirm({
		msg:'<img src="images/notice.gif" /> ',
		stopAfter:'ok',
		eventType:'click',
		timeout:3000,
		buttons: {
			ok:'确认',
			cancel:'取消',
			separator:' | '
		}
	});
	
	// 下拉列表框 menu_id_update 被点击
	$("#menu_id_update").change(function(){
		
		optionid = $(this).val();
		
		// 预填写修改表单
		$("#title_update").val($("#menu_id_update option[value='" + optionid +  "']").attr("title"));
		$("#controller_update").val($("#menu_id_update option[value='" + optionid +  "']").attr("controller"));
		$("#action_update").val($("#menu_id_update option[value='" + optionid +  "']").attr("action"));
		$("#args_update").val($("#menu_id_update option[value='" + optionid +  "']").attr("args"));
		
		// 预填写上级菜单下拉列表框
		$.get("websetup.php",{
			controller   : 'admin_menu',
			action       : 'ajaxmenutree',
			parent_id    : $(this).val()
		},function(response){
		
			// 先清除原有项目，在生成parent_menu_update下拉列表项
			$("#parent_menu_update").html("");
			$("#parent_menu_update").append("<option value='0'>ROOT</option>");
			list = eval('(' + response + ')');
			$.each(list,function(i,value){
				$("#parent_menu_update").append("<option value=\"" + value.menu_id + "\">" + value.levelstr + value.title + "</option>");
			});
			// 选中当前项目
			$("#parent_menu_update option[value='" + $("#menu_id_update option:selected").attr("parent_id") + "']").attr("selected","selected");
			
		});
	});
	
});
// -->
</script>

</head>  


<body> 
  <div id="page_margins">

    <div id="border-top">
      <div id="edge-tl"></div>
      <div id="edge-tr"></div>
    </div>
    <div id="page">
      <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/Websetup_header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
      <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/Websetup_nav.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

      <div id="main">
        <div id="col1">
          <div id="col1_content" class="clearfix">
            	<?php echo $this->_plugins['function']['webcontrol'][0][0]->_pi_func_webcontrol(array('type' => 'menu','name' => 'myMenu'), $this);?>

          </div>
        </div>
        <div id="col3">
          <div id="col3_content" class="clearfix">
            
				<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/Websetup_menu_list.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
            
          </div>
          <!-- IE Column Clearing -->
          <div id="ie_clearing"> &#160; </div>
        </div>
      </div>
      <!-- begin: #footer -->
      <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/Websetup_footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
    </div>
    <div id="border-bottom">
      <div id="edge-bl"></div>
      <div id="edge-br"></div>
    </div>
  </div>
</body>
</html>